package com.boken.caelum.common.mybatis.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface Mapper<R,E> {

    Long countByExample(E example);

    Long deleteByExample(E example);

    Long deleteByPrimaryKey(Object id);

    Long insert(R record);

    Long insertSelective(R record);

    List<R> selectByExample(E example);

    R selectByPrimaryKey(Object id);

    Long updateByExampleSelective(@Param("record") R record, @Param("example") E example);

    Long updateByPrimaryKeySelective(R record);

    Long updateByExample(@Param("record") R record, @Param("example") E example);

    Long updateByPrimaryKey(R record);

    void insertAndGetId(R record);
}